import { defineComponent as z, resolveComponent as a, openBlock as e, createElementBlock as o, createVNode as k, withCtx as u, Fragment as f, renderList as h, createBlock as y, createElementVNode as i, toDisplayString as r, createTextVNode as B, createCommentVNode as _, normalizeClass as I, resolveDynamicComponent as L, unref as w } from "vue";
const D = (s) => s.replace(/([A-Z])/g, "-$1").toLowerCase(), E = { class: "list-tabs__item" }, T = ["onClick"], F = { class: "avatar" }, O = { class: "content" }, S = {
  key: 0,
  class: "title"
}, Z = {
  key: 1,
  class: "time"
}, j = {
  key: 2,
  class: "time"
}, q = { class: "actions" }, G = ["onClick"], H = {
  key: 0,
  class: "a-icon"
}, J = { class: "a-text" }, K = /* @__PURE__ */ z({
  __name: "index",
  props: {
    list: { default: () => [] },
    actions: { default: () => [] }
  },
  emits: ["clickItem", "clickAction"],
  setup(s, { emit: p }) {
    let l = p;
    const v = (n, d) => {
      l("clickItem", n, d);
    }, m = (n, d) => {
      l("clickAction", n, d);
    };
    return (n, d) => {
      const C = a("el-avatar"), g = a("el-tag"), x = a("el-scrollbar"), A = a("el-tab-pane"), N = a("el-tabs");
      return e(), o("div", E, [
        k(N, null, {
          default: u(() => [
            (e(!0), o(
              f,
              null,
              h(n.list, (b, V) => (e(), y(A, {
                key: V,
                label: b.title
              }, {
                default: u(() => [
                  k(
                    x,
                    { "max-height": "300px" },
                    {
                      default: u(() => [
                        (e(!0), o(
                          f,
                          null,
                          h(b.content, (t, c) => (e(), o("div", {
                            class: "container",
                            key: c,
                            onClick: ($) => v(t, c)
                          }, [
                            i("div", F, [
                              k(C, {
                                size: "small",
                                src: t.avatar
                              }, null, 8, ["src"])
                            ]),
                            i("div", O, [
                              t.title ? (e(), o("div", S, [
                                i(
                                  "div",
                                  null,
                                  r(t.title),
                                  1
                                  /* TEXT */
                                ),
                                t.tag ? (e(), y(g, {
                                  key: 0,
                                  type: t.tagType,
                                  size: "small"
                                }, {
                                  default: u(() => [
                                    B(
                                      r(t.tag),
                                      1
                                      /* TEXT */
                                    )
                                  ]),
                                  _: 2
                                  /* DYNAMIC */
                                }, 1032, ["type"])) : _("v-if", !0)
                              ])) : _("v-if", !0),
                              t.desc ? (e(), o(
                                "div",
                                Z,
                                r(t.desc),
                                1
                                /* TEXT */
                              )) : _("v-if", !0),
                              t.time ? (e(), o(
                                "div",
                                j,
                                r(t.time),
                                1
                                /* TEXT */
                              )) : _("v-if", !0)
                            ])
                          ], 8, T))),
                          128
                          /* KEYED_FRAGMENT */
                        )),
                        i("div", q, [
                          (e(!0), o(
                            f,
                            null,
                            h(n.actions, (t, c) => (e(), o("div", {
                              class: I(["a-item", { border: c !== n.actions.length - 1 }]),
                              onClick: ($) => m(t, c),
                              key: c
                            }, [
                              t.icon ? (e(), o("div", H, [
                                (e(), y(L(`el-icon${w(D)(t.icon)}`)))
                              ])) : _("v-if", !0),
                              i(
                                "div",
                                J,
                                r(t.text),
                                1
                                /* TEXT */
                              )
                            ], 10, G))),
                            128
                            /* KEYED_FRAGMENT */
                          ))
                        ])
                      ]),
                      _: 2
                      /* DYNAMIC */
                    },
                    1024
                    /* DYNAMIC_SLOTS */
                  )
                ]),
                _: 2
                /* DYNAMIC */
              }, 1032, ["label"]))),
              128
              /* KEYED_FRAGMENT */
            ))
          ]),
          _: 1
          /* STABLE */
        })
      ]);
    };
  }
}), M = (s, p) => {
  const l = s.__vccOpts || s;
  for (const [v, m] of p)
    l[v] = m;
  return l;
}, P = /* @__PURE__ */ M(K, [["__scopeId", "data-v-0bbcab14"]]), R = {
  install(s) {
    s.component("m-list", P);
  }
};
export {
  R as default
};
